home *** CD-ROM | disk | FTP | other *** search
- Path: lf.hp.com!gajdos
- From: gajdos@lf.hp.com (Larry Gajdos)
- Newsgroups: comp.lang.c++
- Subject: Re: HELP!! Using STL with Visual C++ 4.1
- Date: 20 Apr 1996 16:14:14 GMT
- Organization: Hewlett-Packard Little Falls Site
- Message-ID: <4lb2gm$h9l@hpavua.lf.hp.com>
- References: <31780118.6204@macromedia.com>
- NNTP-Posting-Host: gajdos@eden.lf.hp.com
-
- : I'm trying to use the STL in my applications using the Visual
- : C++ compiler. I've taken the steps suggested by Microsoft
- : reguarding the use of namespaces and min/max definitions. But
- : the compiler still chokes on line 124 of defalloc.h:
-
- : 122 template <class T1, class T2>
- : 123 inline void construct(T1* p, const T2& value) {
- : 124 new (p) T1(value);
- : 125 }
-
- : The error is:
-
- : error C2661: 'new' : no overloaded function takes 2 parameters
-
- You can solve this problem by using
-
- #include <new.h>
-
- _before_ declaring the STL templates with the STD namespace.
-
- See my earlier post and Robert Kleeman's response for further
- details.
-
- Larry Gajdos, not speaking for HP
-